home *** CD-ROM | disk | FTP | other *** search
- //--------------------------------------------------------------------------//
- // SendFile v1.0 for Maximus v3 //
- // by Chris Gerlinsky, 1:140/186 //
- // //
- // This MEX program is to be called in MENUS.CTL right before the //
- // File_Download command. If the user has not downloaded any files yet //
- // (usr.ndown < 1), it will tag the file SEND_FILE, defined below.. //
- // //
- // NoDsp MEX M\SendFile Demoted "Download" //
- // File_Download Demoted "Download" //
- // //
- // Remember that the filename in SEND_FILE must have all backslashes //
- // escaped! (ie: c:\pub\ = c:\\pub\\) //
- //--------------------------------------------------------------------------//
-
- #include <max.mh>
-
-
- // the file to send to the new downloader.. double backslashes!
-
- #define SEND_FILE "c:\\pub\\misc\\text\\lifefile.txt"
-
-
- void main()
- {
- int: counter,flags;
- string: filename,testfile;
-
- testfile:=SEND_FILE;
-
- if(usr.ndown<1)
- {
- for(counter=0;counter<tag_queue_size();counter:=counter+1)
- {
- tag_get_name(counter,flags,filename);
- if(strlower(filename)=strlower(testfile))
- goto skipit;
- }
-
- flags:=FFLAG_NOTIME|FFLAG_NOBYTES;
- filename:=SEND_FILE;
- tag_queue_file(filename,flags);
- }
-
- skipit:
-
- return;
- }
-